import httpRequest from "@/axios/index.js"

/**
 * 查询列表
 */
 export function querySelectiveReq(pageNum,pageSize,data){
    return httpRequest({
        url:"/workflow/model/list?pageNum="+pageNum+"&pageSize="+pageSize,
        method:"post",
        data:data
    })
}

/**
 * 添加
 */
export function addReq(data){
    return httpRequest({
        url:"/workflow/model/add",
        method:"post",
        data:data
    })
}

/**
 * 修改
 */
 export function updateReq(data){
    return httpRequest({
        url:"/workflow/model/update",
        method:"put",
        data:data
    })
}

/**
 * 删除
 */
 export function deleteReq(ids){
    return httpRequest({
        url:"/workflow/model/delete",
        method:"post",
        data:ids
    })
}

/**
 * 模型设计
 */
export function designReq(data){
    return httpRequest({
        url:"/workflow/model/design",
        method:"post",
        data:data
    })
}

/**
 * 部署模型
 */
export function deployReq(modelId){
    return httpRequest({
        url:"/workflow/model/deploy/"+modelId,
        method:"post",
        data:{}
    })
}

/**
 * 查看模型图
 */
export function queryBpmnImageReq(modelId){
    return httpRequest({
        url:"/workflow/model/bpmn/image/"+modelId,
        method:"get"
    })
}

/**
 * 查询模型的bpmnXml文件内容
 */
export function queryBpmnXmlReq(modelId){
    return httpRequest({
        url:"/workflow/model/bpmn/xml/"+modelId,
        method:"get"
    })
}